import http from "../request"

export const menuList = (parentId: number, pageNum: number, pageSize: number): RES<IMenuMenu> => http.get(`menu/list/${parentId}?pageNum=${pageNum}&pageSize=${pageSize}`)

export const menuUpdateHidden = (id: number, hidden: number): RES<any> => http.post(`menu/updateHidden/${id}?hidden=${hidden}`)

export const adminUpdata = (params: AdminList): RES<number> => http.post(`admin/update/${params.id}`, params)

export const menuCreate = (params: IMenuList): RES<IMenuList> => http.post(`menu/create`, params)

export const menu = (id: number): RES<any> => http.get(`menu/${id}`)

export const menuUpdate = (params: IMenuList): RES<any> => http.post(`menu/update/${params.id}`, params)


